public class Book {
    String title;
    String author;

    public void printInfo() {
        System.out.printf("书名：《%s》，作者：%s\n", title, author);
    }
}